#!/bin/bash
# Zaitan Module - SMC Install
# Zaitan Team <http://code.google.com/p/zaitan/>

RMOD_ENGINE='1.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Games'
RMOD_NAME='SMC'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='1.2'
RMOD_DESCRIPTION='Installs SMC'


# Install SMC

echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall
apt-get install 

debs='alien libsdl-net1.2 libsdl-image1.2 libsdl-mixer1.2 libsdl-gfx1.2-4 libsdl-ttf2.0-0 libcegui-mk2-1 libboost-filesystem1.34.1blibcegui-mk2-dev'
for i in $debs; do
VERIFIQ=$(dpkg -s "$i" 2> /dev/null | grep "Status:" | awk '{ print $3 }')


	if [ "$VERIFIQ" != "ok" ]; then

	apt-get -y install $i
	sleep 1
	
	else
	echo "$i já está instalado"
	sleep 2
fi
done



cd /usr/share/zaitan
wget -c http://mirrors.dotsrc.org/getdeb/sm/smc_1.2-1~getdeb1_i386.deb
wget -c http://mirrors.dotsrc.org/getdeb/sm/smc-data_1.2-1~getdeb1_all.deb


dpkg -i smc-data_1.2-1~getdeb1_all.deb
dpkg -i smc_1.2-1~getdeb1_i386.deb
apt-get -f install


echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0

